package com.sjy;

import org.hibernate.Hibernate;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.sjy.bean.User;
import com.sjy.bean.User1;
import com.sjy.dao.userdao;
@RunWith(SpringRunner.class)
@SpringBootTest
public class test {
	  @Autowired
	 	com.sjy.dao.userdao2 userdao2;
	  @Autowired
	  userdao usedao;
	  @Test
	  public void s() {
		  userdao2.findAll();
			for(User1 user: userdao2.findAll())
			{
				Hibernate.initialize(user.getRoles());
			}
			
	  }
	  @Test
	  public void s1() {
		
		  usedao.findAll();
		  userdao2.findAll();
	  }
}
